package com.chinacoal.hr.levelapi.api;

import com.chinacoal.hr.levelapi.api.fallback.CcmsUserClientFallback;
import com.chinacoal.hr.levelapi.entity.Users;
import com.chinacoal.hr.levelapi.util.Result;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "CCMS-RBAC", configuration = {FeignAutoConfiguration.class}, fallback = CcmsUserClientFallback.class)
public interface CcmsUserClient {
    @GetMapping({"/rbac/user/name"})
    public abstract Result<Users> getUser(@RequestParam("name") String paramString);
}
